﻿@model IEnumerable<WarFrota.Models.Abastecimento>

@{
    ViewBag.Title = "Listagem de Abastecimentos";
}

<h2>Abastecimentos</h2>

<p>
    @Html.ActionLink("Novo", "Create")
</p>
<table>
    <tr>
        <th>
            Placa
        </th>
        <th>
            Data
        </th>
        <th>
            Litros
        </th>
        <th>
            KM Atual
        </th>
        <th>
            Consumo(km/Litros)
        </th>
        <th>
            Observação
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Placa)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Data)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Litros)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.KmAtual)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Observacao)
        </td>
        <td>
            @Html.ActionLink("Alterar", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Detalhes", "Details", new { id=item.Id }) |
            @Html.ActionLink("Excluir", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
